#include "Bitmap.h"

//enum Bitmap_type{	SAND_BITMAP, 
//					DIGDUG_BITMAP_UP, DIGDUG_BITMAP_DOWN, DIGDUG_BITMAP_LEFT, DIGDUG_BITMAP_RIGHT, 
//					MONSTER_BITMAP_NORMAL, MONSTER_BITMAP_GHOST
//				   };

ALLEGRO_BITMAP *getDefaultBitmap(Bitmap_type type)
{

	ALLEGRO_BITMAP *this_bitmap = al_create_bitmap(50,50);
	al_set_target_bitmap(this_bitmap);
	al_clear_to_color(BACKGROUND);

	switch(type)
	{
	case SAND_BITMAP:		
				al_clear_to_color(BROWN);
				al_draw_filled_rectangle(2,2,48,48, ORANGE);
				break;
	case DIGDUG_BITMAP:	
				al_clear_to_color(al_map_rgba(0,0,0,0));
				//Body
				al_draw_filled_circle(25,25,20,WHITE);
				//Face
				al_draw_filled_triangle(10,10,10,40,40,25, BLUE);

				break;
	case MONSTER_BITMAP_NORMAL:	
				al_clear_to_color(al_map_rgba(0,0,0,0));
				//Body
				al_draw_filled_circle(25,25,25,GREEN);
					
				break;
	case MONSTER_BITMAP_GHOST:	
		
				al_clear_to_color(al_map_rgba(0,0,0,0));
				//Body
				al_draw_filled_circle(25,25,25,WHITE);
				break;

	case PROJECTILE_BITMAP: 
				al_clear_to_color(al_map_rgba(0,0,0,0));
				/*al_draw_line(0,25,5,0,RED, 2);
				al_draw_line(5,0,10,50,RED, 2);
				al_draw_line(10,50,15,0,RED, 2);
				al_draw_line(15,0,20,50,RED, 2);
				al_draw_line(20,50,25,0,RED, 2);
				al_draw_line(25,0,30,50,RED, 2);
				al_draw_line(30,50,35,25,RED, 2);
				al_draw_line(30,25,35,25,RED, 3);*/
				al_draw_line(0,25,35,25,RED,3);
				al_draw_filled_triangle(35,10,35,40,50,25, RED);

				break;

	} 

	return this_bitmap;
}
